Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for packet source unit test #1009

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

epassaro
Copy link
Member

@epassaro epassaro commented Jan 21, 2020

The problem: after running tests with --generate-reference flag the /packet_unittest group from the HDF5 five is missing.

Solution: packet_unittest data is stored in a separated HDF5 file (see tardis-sn/tardis-refdata#25) and then stored in unit_test_data.h5 when --generate-reference is called.

bb = BlackBodySimpleSource(2508)
#ref_df = pd.read_hdf('test_bb_sampling.h5')
if pytest.config.getvalue("--generate-reference"):
ref_bb = pd.read_hdf(packet_unit_test_fpath, key='/blackbody')
ref_bb.to_hdf(tardis_ref_data, key='/packet_unittest/blackbody',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ref_bb.to_hdf(tardis_ref_data, key='/packet_unittest/blackbody',
ref_bb.to_hdf(tardis_ref_data, key='/packet_unit_test/blackbody',

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Marc followed the convention and named packet_unittest as previous group called plasma_unittest.

@wkerzendorf wkerzendorf merged commit 71dad34 into tardis-sn:master Jan 21, 2020
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
* Initial commit

* Suggested name change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants